<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <!-- 
            span元素无样式设置, 继承p元素的样式
            元素外观(文字, 颜色, 字体等)相关的样式会被继承
            布局相关的样式不会被继承
            可使用inherit强制继承
         -->
    <style type="text/css">
        p {
            color: white;
            background: grey;
            border: medium solid black;
        }

        span {
            border: inherit;
        }
    </style>
</head>

<body>
    <a href="http://apress.com">
        Visit the Apress website
    </a>
    <p>I like <span>apples</span> and oranges.</p>
    <a href="http://w3c.org">Visit the W3C website</a>
</body>

</html>